/*
 * @Author: fisher
 * @Date: 2024-02-06 10:38:43
 * @LastEditors: luthor luthor-li@qq.com
 * @LastEditTime: 2024-02-06 22:49:06
 * @FilePath: \allback\routes\Auth.js
 * @Description:
 */
// routes/auth.js
const Router = require('koa-router')
// const User = require('../models/User')
// const bcrypt = require('bcryptjs')
// const jwt = require('jsonwebtoken')
// const secret = process.env.JWT_SECRET // 在真实应用中，这应该是一个环境变量，而不是硬编码
const router = new Router()
const AuthController = require('../controllers/AuthController')
// 用户注册路由
router.post('/register', AuthController.register)
// 用户登录路由
router.post('/login', AuthController.login)
// 用户登出路由
router.get('/logout', AuthController.logout)
// 用户修改密码路由
router.post('/changepassword', AuthController.changepassword)
module.exports = router
